import request from '@/utils/request'

// 查询业务-动态类别列表
export function listDynamicType(query) {
  return request({
    url: '/bussiness/dynamicType/list',
    method: 'get',
    params: query
  })
}

// 查询业务-动态类别详细
export function getDynamicType(dynamicTypeId) {
  return request({
    url: '/bussiness/dynamicType/' + dynamicTypeId,
    method: 'get'
  })
}

// 新增业务-动态类别
export function addDynamicType(data) {
  return request({
    url: '/bussiness/dynamicType',
    method: 'post',
    data: data
  })
}

// 修改业务-动态类别
export function updateDynamicType(data) {
  return request({
    url: '/bussiness/dynamicType',
    method: 'put',
    data: data
  })
}

// 删除业务-动态类别
export function delDynamicType(dynamicTypeId) {
  return request({
    url: '/bussiness/dynamicType/' + dynamicTypeId,
    method: 'delete'
  })
}

//上移 下移
export function moveUpOrDown(data) {
  return request({
    url: '/bussiness/dynamicType/moveUpOrDown',
    method: 'put',
    data
  })
}

//置顶 置底
export function pinToTopOrEnd(data) {
  return request({
    url: '/bussiness/dynamicType/pinToTopOrEnd',
    method: 'put',
    data
  })
}
